//
//  UMServer.h
//  YRSideViewController
//
//  Created by xiabin on 15/1/8.
//  Copyright (c) 2015年 YueRuo. All rights reserved.
//

#ifndef YRSideViewController_UMServer_h
#define YRSideViewController_UMServer_h

//#define UMServerBaseURL(_URL_) [NSURL URLWithString:[@"http://i.faaay.com/" stringByAppendingString:_URL_]]
//#define UMServerBaseURL(_URL_) [NSURL URLWithString:[@"http://m.faaay.com/olive/" stringByAppendingString:_URL_]]
//#define UMServerBaseURL(_URL_) [NSURL URLWithString:[@"http://115.28.245.237:8080/fay/" stringByAppendingString:_URL_]]
//#define UMServerBaseURL(_URL_) [NSURL URLWithString:[@"http://192.168.1.99:8082/api/" stringByAppendingString:_URL_]]
#define UMServerBaseURL(_URL_) [NSURL URLWithString:[@"http://112.74.217.63:8080/" stringByAppendingString:_URL_]]

#define SHARE_POST(PDES) [NSString stringWithFormat:@"http://i.faaay.com/mobile/posts/%@", PDES]
#define SHARE_PRODUCT(PDES) [NSString stringWithFormat:@"http://i.faaay.com/mobile/product/%@", PDES]
#define PRODUCT_Description(PDES) [NSString stringWithFormat:@"http://i.faaay.com/mobile/product/%d"/description, PDES]
#define PRODUCT_Standard(PDES) [NSString stringWithFormat:@"http://i.faaay.com/mobile/product/%d"/standard, PDES]
#define PRODUCT_packing(PDES) [NSString stringWithFormat:@"http://i.faaay.com/mobile/product/%d"/packing, PDES]
#define GEGEJIEStore @"http://i.faaay.com/mobile/credits"
#define GEGEJIEAbout @"http://i.faaay.com/mobile/aboutus"
#define GEGEJIELicense @"http://i.faaay.com/mobile/agreement"


///////////////New
#define _URL_PARAM_GetCityInfo(_CityName_) [NSString stringWithFormat:@"air/quality/%@", _CityName_]
#define _URL_PARAM_GetPwd(_PhoneNumber_) [NSString stringWithFormat:@"user/dynamicPwd?username=%@", _PhoneNumber_]

///////////////Old 废弃

#define _URL_PARAM_Login [NSString stringWithFormat:@"user/login"] 
#define _URL_PARAM_3rdLogin [NSString stringWithFormat:@"user/thirdPartyLogin"] 
#define _URL_PARAM_Reginfo [NSString stringWithFormat:@"user/saveProfile"] 

#define _URL_PARAM_PostsCategory(_ts_) [NSString stringWithFormat:@"posts/category/list?ts=%d", _ts_]

#define _URL_PARAM_GetPostsByCategory(_CateGoryID, _UID, _TS, _ItemNum) [NSString stringWithFormat:@"posts/list/%d/%d?ts=%d&pageSize=10&pageNumber=%d",_CateGoryID, _UID, _TS, _ItemNum]

#define _URL_PARAM_GetPostByID(_UID, _PostID,_TS) [NSString stringWithFormat:@"posts/%d/%d?ts=%d", _PostID,_UID, _TS]

#define _URL_PARAM_GetCommentsByID(_PostID,_TS,_PageIndex) [NSString stringWithFormat:@"posts/%d/comments?ts=%d&pageSize=15&pageNumber=%d", _PostID, _TS, _PageIndex]

#define _URL_PARAM_PubPost [NSString stringWithFormat:@"posts"] 

#define _URL_PARAM_FavorPost(_PostID, _UID) [NSString stringWithFormat:@"posts/%d/favour/%d", _PostID, _UID]

#define _URL_PARAM_PubComment(_PostID) [NSString stringWithFormat:@"posts/%d/comments", _PostID]
//#define _URL_PARAM_Register(_PhoneCode_) [NSString stringWithFormat:@"index/init?deviceType=1&phoneCode=%@", _PhoneCode_]

#define _URL_PARAM_GetProduct [NSString stringWithFormat:@"product"] 
#define _URL_PARAM_GetProductHomeSingle [NSString stringWithFormat:@"product/list?ts=0"] 
#define _URL_PARAM_GetTopic(_TS) [NSString stringWithFormat:@"product/topic?ts=%d",_TS] 

#define _URL_PARAM_Product_Description(_ID) [NSString stringWithFormat:@"mobile/product/%d/description", _ID]
#define _URL_PARAM_Product_Standard(_ID) [NSString stringWithFormat:@"mobile/product/%d/standard", _ID]
#define _URL_PARAM_Product_Packing(_ID) [NSString stringWithFormat:@"mobile/product/%d/packing", _ID]

#define _URL_PARAM_GetProductComments(_ProductID, _TS, _PageIndex) [NSString stringWithFormat:@"product/%d/review?ts=%d&pageSize=50&pageNumber=%d", _ProductID, _TS, _PageIndex]

#define _URL_PARAM_ReViewProduct(_ProductID) [NSString stringWithFormat:@"product/%d/review", _ProductID]

#define _URL_PARAM_AddShoppingCart [NSString stringWithFormat:@"sales/cart"]

#define _URL_PARAM_SaveAddress [NSString stringWithFormat:@"customer/address"]

#define _URL_PARAM_ApplyOrder [NSString stringWithFormat:@"sales/order"]

#define _URL_PARAM_GetRCLoginToken(_ID) [NSString stringWithFormat:@"chat/user/%d/token", _ID]

#define _URL_PARAM_GetUsersInfoBatch(_IDS) [NSString stringWithFormat:@"user/profiles?uids=%@", _IDS]

#define _URL_PARAM_GetUsersGroup(_UID) [NSString stringWithFormat:@"chat/group?uid=%d", _UID]

#define _URL_PARAM_GetChatroom(_UID, _TS) [NSString stringWithFormat:@"chat/room?uid=%d&ts=%d", _UID, _TS]

#define _URL_PARAM_GetMyCommentsByID(_UID,_TS,_PageIndex) [NSString stringWithFormat:@"posts/mycomment/%d?ts=%d&pageSize=50&pageNumber=%d", _UID, _TS, _PageIndex]

#define _URL_PARAM_GetMyLikesByID(_UID,_TS,_PageIndex) [NSString stringWithFormat:@"posts/favour/%d?ts=%d&pageSize=50&pageNumber=%d", _UID, _TS, _PageIndex]

#define _URL_PARAM_GetUIDFollowing(_UID,_TS,_PageIndex) [NSString stringWithFormat:@"user/relation/%d/following?ts=%d&pageSize=50&pageNumber=%d", _UID, _TS, _PageIndex]

#define _URL_PARAM_GetUIDFans(_UID,_TS,_PageIndex) [NSString stringWithFormat:@"user/relation/%d/follower?ts=%d&pageSize=50&pageNumber=%d", _UID, _TS, _PageIndex]

#define _URL_PARAM_GetOrders(_UID, _TS, _PageIndex, _Status) [NSString stringWithFormat:@"sales/order/%d?ts=%d&pageNumber=%d&pageSize=15&orderStatus=%d", _UID, _TS, _PageIndex, _Status]

#define _URL_PARAM_GetUserCard(_TargetUID, _SelfUID, _TS) [NSString stringWithFormat:@"user/%d/card?fromUid=%d&ts=%d", _TargetUID, _SelfUID, _TS]

#define _URL_PARAM_GetSelfInfo(_UID, _TS) [NSString stringWithFormat:@"user/%d/profile?ts=%d", _UID, _TS]

#define _URL_PARAM_GetUserPosts(_UID) [NSString stringWithFormat:@"posts/%d", _UID]

#define _URL_PARAM_FollowUser(_UID) [NSString stringWithFormat:@"user/relation/%d/follow", _UID]

#define _URL_PARAM_UnFollowUser(_UID, _UnFollowId) [NSString stringWithFormat:@"user/relation/%d/follow?followingUid=%d", _UID, _UnFollowId]

#define _URL_PARAM_UpdateHead(_UID) [NSString stringWithFormat:@"user/avatar/%d", _UID]

#define _URL_PARAM_UpdateInfoByField(_UID) [NSString stringWithFormat:@"user/%d", _UID]

#define _URL_PARAM_ProductDetail(_PID,_TS) [NSString stringWithFormat:@"product/%d?ts=%d", _PID,_TS]

#define _URL_PARAM_GetTopicProdcuts(_TopicID,_TS) [NSString stringWithFormat:@"product/topic/%d/product?ts=%d", _TopicID,_TS]

#define _URL_PARAM_Prodcut_FollowOP [NSString stringWithFormat:@"product/follow"]

#define _URL_PARAM_Prodcut_GetFollows(_UID, _PgIndex, _PgSize, _Ts) [NSString stringWithFormat:@"product/follow?uid=%d&pageNumber=%d&pageSize=%d&ts=%d",_UID, _PgIndex, _PgSize, _Ts]

#define _URL_PARAM_Report_Post(_UID, _PostID) [NSString stringWithFormat:@"posts/%d/report/%d",_PostID, _UID]

#define _URL_PARAM_Bind_BDPush_Post [NSString stringWithFormat:@"common/push/bind"]

#define _URL_PARAM_Setting(_UID) [NSString stringWithFormat:@"user/setting/%d", _UID]

#define _URL_PARAM_Confirm(_OrderID) [NSString stringWithFormat:@"sales/order/%d/confirm", _OrderID]

#endif
